const express = require('express');
const router = express.Router();
router.get('/', (req, res) => {
    res.json({
        message: '',
        payload: {
            varietyData: [{
                month: '2019-06',
                variety: 7468.0,
                deliveryVariety: 7338.0,
                rate: 98.3
            }, {
                month: '2019-07',
                variety: 8071.0,
                deliveryVariety: 8027.0,
                rate: 99.5
            }, {
                month: '2019-08',
                variety: 9678.0,
                deliveryVariety: 9634.0,
                rate: 99.5
            }, {
                month: '2019-09',
                variety: 7490.0,
                deliveryVariety: 7468.0,
                rate: 99.7
            }, {
                month: '2019-10',
                variety: 8643.0,
                deliveryVariety: 8477.0,
                rate: 98.1
            }, {
                month: '2019-11',
                variety: 9592.0,
                deliveryVariety: 9528.0,
                rate: 99.3
            }, {
                month: '2019-12',
                variety: 8237.0,
                deliveryVariety: 8080.0,
                rate: 98.1
            }, {
                month: '2020-01',
                variety: 11109.0,
                deliveryVariety: 10971.0,
                rate: 98.8
            }, {
                month: '2020-02',
                variety: 3269.0,
                deliveryVariety: 3252.0,
                rate: 99.5
            }, {
                month: '2020-03',
                variety: 12140.0,
                deliveryVariety: 11843.0,
                rate: 97.6
            }, {
                month: '2020-04',
                variety: 6633.0,
                deliveryVariety: 6569.0,
                rate: 99.0
            }, {
                month: '2020-05',
                variety: 6020.0,
                deliveryVariety: 5954.0,
                rate: 98.9
            }],
            amountMeetData: [{
                month: '2019-06',
                variety: 83.53,
                deliveryVariety: 80.21,
                rate: 96.0
            }, {
                month: '2019-07',
                variety: 80.40,
                deliveryVariety: 82.23,
                rate: 102.3
            }, {
                month: '2019-08',
                variety: 111.80,
                deliveryVariety: 112.00,
                rate: 100.1
            }, {
                month: '2019-09',
                variety: 82.97,
                deliveryVariety: 86.45,
                rate: 104.2
            }, {
                month: '2019-10',
                variety: 84.47,
                deliveryVariety: 87.35,
                rate: 103.4
            }, {
                month: '2019-11',
                variety: 107.66,
                deliveryVariety: 107.73,
                rate: 100.1
            }, {
                month: '2019-12',
                variety: 119.87,
                deliveryVariety: 121.65,
                rate: 101.5
            }, {
                month: '2020-01',
                variety: 116.87,
                deliveryVariety: 311.19,
                rate: 266.3
            }, {
                month: '2020-02',
                variety: 43.30,
                deliveryVariety: 43.43,
                rate: 100.3
            }, {
                month: '2020-03',
                variety: 348.29,
                deliveryVariety: 332.64,
                rate: 95.5
            }, {
                month: '2020-04',
                variety: 100.01,
                deliveryVariety: 94.63,
                rate: 94.6
            }, {
                month: '2020-05',
                variety: 83.16,
                deliveryVariety: 69.85,
                rate: 84.0
            }],
            quantityData: [{
                month: '2019-06',
                variety: 1264977.0,
                deliveryVariety: 1262800.0,
                rate: 99.8
            }, {
                month: '2019-07',
                variety: 1160535.0,
                deliveryVariety: 1160011.0,
                rate: 100.0
            }, {
                month: '2019-08',
                variety: 171854.0,
                deliveryVariety: 171055.0,
                rate: 99.5
            }, {
                month: '2019-09',
                variety: 608514.0,
                deliveryVariety: 608144.0,
                rate: 99.9
            }, {
                month: '2019-10',
                variety: 214513.0,
                deliveryVariety: 213701.0,
                rate: 99.6
            }, {
                month: '2019-11',
                variety: 137591.0,
                deliveryVariety: 137164.0,
                rate: 99.7
            }, {
                month: '2019-12',
                variety: 171033.0,
                deliveryVariety: 170183.0,
                rate: 99.5
            }, {
                month: '2020-01',
                variety: 374864.0,
                deliveryVariety: 371518.0,
                rate: 99.1
            }, {
                month: '2020-02',
                variety: 51174.0,
                deliveryVariety: 51263.0,
                rate: 100.2
            }, {
                month: '2020-03',
                variety: 481419.0,
                deliveryVariety: 464202.0,
                rate: 96.4
            }, {
                month: '2020-04',
                variety: 191324.0,
                deliveryVariety: 185734.0,
                rate: 97.1
            }, {
                month: '2020-05',
                variety: 96310.0,
                deliveryVariety: 94801.0,
                rate: 98.4
            }],
        }
    });
});

router.get('/type', (req, res) => {
    res.json({
        message: '',
        payload: [
            {
                id: '192b43d4-662a-4678-a7b7-4bfeef7314ba',
                month: '2020年4月',
                orderCount: 1, //订单份数
                piVarietyQty: 27, //PI项数
                deliveryVarietyQty: 4, // 备货项数
                piAmount: 2, // PI金额
                deliveryAmount: 2, //备货金额
                piQuantity: 3, //PI数量
                deliveryQuantity: 3, //备货数量
                varietyMeetRate: 1, // 品种满足率
                amountMeetRate: 2, //金额满足率
                quantityMeetRate: 3 //数量满足率
            },
            {
                id: '192b43d4-662a-4678-a7b7-4bfeef7314bb',
                month: '2020年5月',
                orderCount: 1, //订单份数
                piVarietyQty: 27, //PI项数
                deliveryVarietyQty: 4, // 备货项数
                piAmount: 2, // PI金额
                deliveryAmount: 2, //备货金额
                piQuantity: 3, //PI数量
                deliveryQuantity: 3, //备货数量
                varietyMeetRate: 1, // 品种满足率
                amountMeetRate: 2, //金额满足率
                quantityMeetRate: 3 //数量满足率
            }
        ]
    });
});

router.get('/country', (req, res) => {
    res.json({
        message: '',
        payload: [
            {
                id: '0a0b0763-a639-4c66-94ab-551e63088376',
                country: '巴西JV',
                details: [
                    {
                        id: '30782fc0-6713-4d72-8329-ef35f44eed3f',
                        month: '2020年4月',
                        orderCount: 1, //订单份数
                        piVarietyQty: 4, //PI项数
                        deliveryVarietyQty: 4, // 备货项数
                        piAmount: 2, // PI金额
                        deliveryAmount: 2, //备货金额
                        piQuantity: 3, //PI数量
                        deliveryQuantity: 3, //备货数量
                        varietyMeetRate: 100, // 品种满足率
                        amountMeetRate: 200, //金额满足率
                        quantityMeetRate: 300 //数量满足率
                    },
                    {
                        id: '30782fc0-6713-4d72-8329-ef35f44eed31',
                        month: '2020年5月',
                        orderCount: 1, //订单份数
                        piVarietyQty: 4, //PI项数
                        deliveryVarietyQty: 4, // 备货项数
                        piAmount: 2, // PI金额
                        deliveryAmount: 2, //备货金额
                        piQuantity: 3, //PI数量
                        deliveryQuantity: 3, //备货数量
                        varietyMeetRate: 100, // 品种满足率
                        amountMeetRate: 200, //金额满足率
                        quantityMeetRate: 300 //数量满足率
                    }
                ]
            }
        ]
    });
});
module.exports = router;
